package svc

import (
	"alibaba-register/alibabarpc/alibabarpcclient"
	"alibaba-register/api/internal/config"
	"github.com/zeromicro/go-zero/zrpc"
)

type ServiceContext struct {
	Config     config.Config
	AlibabaRpc alibabarpcclient.Alibabarpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:     c,
		AlibabaRpc: alibabarpcclient.NewAlibabarpc(zrpc.MustNewClient(c.AlibabaRpc)),
	}
}
